line 18, I think fnraw should be fname_raw. I also edited some similar places