fixed file saving for pic and raw