Added a message context to clear up messy overwriting of global variables
Saves file with name