adding some logging
fixing permissions
added simple logging