added a check of the file extension for open and save
fixed bg attachement, removed logs
better test scripts