Execution remains in event wait even if the file is present