check if input is actually a file