Custom assert function for files