def is_valid_file(filename):
if os.path.exists(filename):<EOL><INDENT>if not os.path.getsize(filename):<EOL><INDENT>logger.warning('<STR_LIT>', filename)<EOL>return False<EOL><DEDENT><DEDENT>else:<EOL><INDENT>logger.warning('<STR_LIT>', filename)<EOL>return False<EOL><DEDENT>return True<EOL>
Check if the specifed file exists and is not empty

:param filename: full path to the file that needs to be checked
:return: Status, Message