Pi cam writing to file