moved code of writing to file from CameraActivity to FileHandler