add checks for files