Check correct file handle