Extract check if file is a pipe to func