Fixed save to file function and success msg output.