Added check for empty file from user