ENH: changes after the comments, change  create_filepath to _valid_inputs