Prevent file name from being empty