fixing alert patterns, secret permission and changing default email host to localhost