Changed get_file_contents to return data as base64 to avoid xml encoding issues