inserted error messages

put in error/success messages, changed make_filename() so that it
returns a string