Refactored error and validation from #import to #valid_input_file? and added before_filter