add check for file