added error checking for no filename given

added error checking for no filename given